/****** Object:  Stored Procedure [dbo].spcatogeryInsert Script Date: 11/24/2012 ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[spcatogeryInsert]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
	DROP PROCEDURE [dbo].[spcatogeryInsert]
GO

/******************************************************************************
**		Name: [dbo].spcatogeryInsert
**		Desc:
**
**		Return values:
**
**		Called by:
**
**		Parameters:
**		Input						Output
**		----------					----------
**
**		Auth: MinhSong
**		Date: 11/24/2012
*******************************************************************************
**		Change History
*******************************************************************************
**		Date:		Author:					Description:
**		--------	--------				-----------------------------------
**
*******************************************************************************/

CREATE PROCEDURE [dbo].[spcatogeryInsert]
(
	@CatogeryName nvarchar(50),
	@CatogeryID int output
)
WITH ENCRYPTION

AS

SET NOCOUNT ON

INSERT INTO [tbl_catogery]
(
	[CatogeryName]
)
VALUES
(
	@CatogeryName
)

SELECT @CatogeryID = SCOPE_IDENTITY()
--SELECT @Id = @@IDENTITY
GO

--GRANT EXECUTE ON [dbo].[spcatogeryInsert] TO [sa]
--GO
